﻿using System.Windows.Media;

namespace CharacterModel.Extensions
{
    public static class ColorExtensions
    {
        public static string GetSvgStyle(this Color color)
        {
            var fillColor = string.Format("{0:X2}{1:X2}{2:X2}", color.R, color.G, color.B);
            var fillOpacity = color.A/255D;
            return string.Format("fill:#{0};fill-opacity:{1};", fillColor, fillOpacity);
        }
    }
}